<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <link rel="stylesheet" type="text/css" href="abc.css" />
    <h:head>
        <title>Alunos</title>
    </h:head>
    <h:body>

        <h:form>
        <div>
                <table>
                    <tr>
                        <td>Nome:</td>
                        <td><h:inputText value="#{listaAluno.aluno.nome}" /></td>
                    </tr>
                    <tr >
                        <td >Sobrenome:</td>
                        <td><h:inputText value="#{listaAluno.aluno.sobrenome}" /></td>
                    </tr>
                    <tr >
                        <td>Nota:</td>
                        <td><h:inputText value="#{listaAluno.aluno.nota}" /></td>
                    </tr>
                </table>
            <div><h:commandButton action="#{listaAluno.adicionar}" value="Incluir" /> </div>
            </div>
            </h:form>

        <div>
            <h:form>
            <h:dataTable var="aluno" value="#{listaAluno.alunos}"
                         styleClass="tabela" headerClass="cabecalho-tabela"
                             rowClasses="linha-par,linha-impar"
                             footerClass="somatotal">
                <h:column>
                    <f:facet name="header">
                            Nome
                    </f:facet>
                        #{aluno.nome}
               </h:column>

                <h:column>
                    <f:facet name="header">
                            Sobrenome
                    </f:facet>
                        #{aluno.sobrenome}
               </h:column>

                <h:column>
                    <f:facet name="header">
                            Nota
                    </f:facet>
                        #{aluno.nota}
               </h:column>

                <h:column>
                    <h:commandLink action="#{listaAluno.atualizar(aluno)}">
              
                    <h:graphicImage value="images.jpeg" />
                    </h:commandLink>
                </h:column>

            </h:dataTable>
                </h:form>





        </div>



    </h:body>
</html>

